<template>
    <div class="cmt-container">
        <h4>留言反馈</h4>
        <hr>
        <textarea v-model="msg" placeholder="请输入留言内容（不超过500字）" maxlength="500"></textarea>
        <mt-button type="primary" size="large" v-on:click="submitMessage()">提交留言</mt-button>
    </div>
</template>

<script>
import {Toast} from 'mint-ui'
export default{
    data() {
        return {
            msg: ''
        }
    },
    methods: {
        submitMessage(){
            if (this.msg=='') {
                Toast("内容不能为空！")
            }else{
                Toast("提交成功！")
                this.msg=''
            }
        }
    }
}
</script>

<style lang="scss" scoped>
.cmt-container{
    padding: 10px;
    margin-top: 20px;
    h4{
        text-align: center;
    }
    textarea{
        height: 350px;
    }
}
</style>

